<include file="Public/header" />
<include file="Public/menu" />

<!-- 内容页 -->
<div class="content-wrapper">
    <!-- 面包屑 -->
    <section class="content-header">
        <h1>
            商品
            <small>管理</small>
        </h1>
        <ol class="breadcrumb">
            <li><a href="#"><i class="fa fa-dashboard"></i> 商品管理</a></li>
            <li class="active">添加标签</li>
        </ol>
    </section>

    <!-- 内容 -->
    <section class="content"><div class="row"><div class="col-md-12">
        <div class="box box-info">
            <div class="box-header with-border">
                <h3 class="box-title">添加标签</h3>

                <div class="box-tools">

                    <div class="btn-group pull-right" style="margin-right: 10px">
                        <a href="/Qgs/label/index" class="btn btn-sm btn-default"><i class="fa fa-list"></i>&nbsp;标签列表</a>
                    </div>
                </div>
            </div>
            <!-- /.box-header -->
            <!-- form start -->
            <form action="/Qgs/label/add" method="post" id="form" class="form-horizontal">
                <div class="box-body">
                    <div class="form-group 1">
                        <label class="col-sm-2 control-label">标签名称</label>
                        <div class="col-sm-6">
                            <div class="input-group">
                                <span class="input-group-addon"><i class="fa fa-pencil"></i></span>
                                <input type="test" name="name" value="" class="form-control" placeholder="标签名称">
                            </div>
                        </div>
                    </div>
                </div>
                <!-- /.box-body -->
                <div class="box-footer">
                    <div class="col-sm-2">

                    </div>
                    <div class="col-sm-6">

                        <div class="btn-group pull-left">
                            <button type="submit" class="btn btn-info pull-right">提交</button>
                        </div>
                    </div>

                </div>
                <!-- /.box-footer -->
            </form>
        </div>

    </div></div>

    </section>
</div>
<!-- 底部 -->
<include file="Public/common_footer" />

<script>

    //表单验证
    $("#form").validate({
        rules: {
            name:{
                required: true
            }
        },
        messages:{
            name: {
                required: "请输入标签",
            }
        },
        submitHandler: function(form){
            form.submit();   //提交表单
        }
    });
</script>
